package BackEnd;

import java.util.Map;

/**
 * My understanding on the use of this folio is that 
 * in the login frame/class,
 * 
 * A username is entered
 * A new Folio object is created
 * If the password matches the stored pass, then the file for that user is loaded and parsed.
 * Each stock in the file is added to that Folio with folio.buyShares (can be used to add new stock,
 * 						as well as buy shares in existing stock
 * 
 * in the newStock frame/class,
 * folio.buyShares(stockTicker, numShares, costPerStock) is called
 * whenever the newStock Add button action is performed. 
 *  
 * 	setCostPerShare() should be called every time interval for each stock of the folio.
 * 						I don't know how this data is obtained.
 * 
 * The remaining methods should be fairly clear.
 */
 
public interface IFolio {
	
	public Map<String, Integer> getFoliomap();
	public void buyShares(String stockTicker, int numShares, double costPerStock);
	public void addStock(String stockTicker);
	// Add new stock, if stockTicker doesnt already exist.
	// Otherwise, buys new shares at the supplied cost.

	public double sellShares(String stockTicker, int numShares);
	// sells share, returning the total amount sold.

	public void removeStock(String stockTicker);
	// Removes a folio entry.

	public double getStockNetValue(String stockTicker);
	// Gets the projected balance, with regards to total expenditure to a time,
	// and a stock's potential value if all was sold

	public int getNumShares(String stockTicker);
	// Returns the number of shares.

	public double getTotalCost(String stockTicker);
	// Returns the total running amount of money spent on that stock.

	public double getPotentialSaleValue(String stockTicker);
	// Returns the amount that would be gained by selling all stock

	public void setCostPerShare(String stockTicker, double costPerStock);
	// Updates the share value. this is also called on buyShares();

	// A folio is unique to a user,
	// IFolio [username] = new Folio();
	// Would be used on inital log in, then manipulated with the above methods.
	public void save();

}
